package com.blockmeta.bbs.businesslibrary.util.navigation.impl;

import android.net.Uri;
import android.text.TextUtils;

import com.blockmeta.bbs.businesslibrary.arouter.RouterPath;
import com.blockmeta.bbs.businesslibrary.constant.Constant;
import com.blockmeta.bbs.businesslibrary.launch.contactusYMAL;
import com.blockmeta.bbs.businesslibrary.pojo.ContactUSPOJO;
import com.blockmeta.bbs.businesslibrary.util.navigation.SimpleDeepLinkStrategy;

import java.util.HashMap;
import java.util.Map;


/**
 * @author AirThor
 * @date 2019/7/25.
 * "blockmeta://invite"
 */
public class InviteStrategy extends SimpleDeepLinkStrategy {
    ContactUSPOJO sContactUSPOJO = contactusYMAL.getContactUSPOJO();
    @Override
    public Uri uriTransformer(Uri uri) {
        return Uri.parse("blockmeta://invite"+ RouterPath.HTML_INVITE_ACTIVITY);
    }

    @Override
    public Map<String, String> navigationParams(Uri uri) {
        HashMap<String,String> params = new HashMap<>(2);
        String activeLink = sContactUSPOJO.getActivitydesc().getLink();
        params.put(Constant.ZERO, TextUtils.isEmpty(activeLink) ? "http://normal.h5_test.8btc.com/" : activeLink);
        return params;
    }
}
